<insert id="{{statementName}}" parameterType="{{parameterType}}"
        keyProperty="{{keyProperty}}" keyColumn="{{keyColumn}}"
        useGeneratedKeys="{{useGeneratedKeys}}">
    {{#useGeneratedKeys}}
        <selectKey keyProperty="{{keyProperty}}" keyColumn="{{keyColumn}}"
                   order="{{order}}" resultType="{{keyType}}">{{keySql}}</selectKey>
    {{/useGeneratedKeys}}
    INSERT INTO {{table}}
    <trim prefix="(" suffix=")" suffixOverrides=",">
        {{#properties}}
            {{#selective}}
            <if test="{{#testNotNull}}{{key}}{{/testNotNull}}">
            {{/selective}}
            {{^excludeId}}
                {{value.name}},
            {{/excludeId}}
            {{#excludeId}}
                {{^value.primaryKey}}{{value.name}},{{/value.primaryKey}}
            {{/excludeId}}
            {{#selective}}</if>{{/selective}}
        {{/properties}}
    </trim>
    <trim prefix="values(" suffix=")" suffixOverrides=",">
        {{#properties}}
            {{#selective}}
            <if test="{{#testNotNull}}{{key}}{{/testNotNull}}">
            {{/selective}}
            {{^excludeId}}
                #{ {{key}}{{#value.jdbcType}}
                ,jdbcType={{value.jdbcType}}{{/value.jdbcType}}{{#value.typeHandler}}
                ,typeHandler={{value.typeHandler.name}}{{/value.typeHandler}} },
            {{/excludeId}}
            {{#excludeId}}
                {{^value.primaryKey}}#{ {{key}}{{#value.jdbcType}}
                    ,jdbcType={{value.jdbcType}}{{/value.jdbcType}}{{#value.typeHandler}}
                    ,typeHandler={{value.typeHandler.name}}{{/value.typeHandler}}
                    },{{/value.primaryKey}}
            {{/excludeId}}
            {{#selective}}</if>{{/selective}}
        {{/properties}}
    </trim>
</insert>
